﻿using System;
using System.Data.Linq.Mapping;

namespace AEM.Data.Model
{
    [Table(Name = "TableFaultLog")]
    public class FaultLog
    {
        public FaultLog()
        {
            this.ID = 0;
            this.LiftNum = 0;
            this.FaultType = Enum.LiftStatus.Normal;
            this.JoinDate = DateTime.Now;
        }

        public FaultLog(int liftnum, Enum.LiftStatus liftStatus, DateTime dateTime)
        {
            this.ID = 0;
            this.LiftNum = liftnum;
            this.FaultType = liftStatus;
            this.JoinDate = dateTime;
        }
        [Column(IsPrimaryKey=true)]
        public int ID { get; set; }
        [Column]
        public int LiftNum { get; set; }
        [Column]
        public Enum.LiftStatus FaultType { get; set; }
        [Column]
        public DateTime JoinDate { get; set; }
    }
}
